package com.event.use.compontent;

import com.event.annotation.ListenBean;
import com.event.annotation.ListenComponent;
import com.event.use.entity.TestEntity;
import com.event.use.service.TestService;
import jakarta.annotation.Resource;

/**
 * @author zhangbo
 * @program: event-plus
 * @ClassName TestEventComponent
 * @description: $
 * @date 2024-07-01 11:02:33
 */
@ListenComponent
public class TestEventComponent {

    @Resource
    private TestService testService;

    @ListenBean(TestEntity.class)
    public void testEvent(TestEntity testEntity) {
        System.out.println("testEvent");
        testService.receiveEvent(testEntity);
    }
}
